package com.zzxx.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class RuleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RuleExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTargettypeIsNull() {
            addCriterion("targetType is null");
            return (Criteria) this;
        }

        public Criteria andTargettypeIsNotNull() {
            addCriterion("targetType is not null");
            return (Criteria) this;
        }

        public Criteria andTargettypeEqualTo(Integer value) {
            addCriterion("targetType =", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeNotEqualTo(Integer value) {
            addCriterion("targetType <>", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeGreaterThan(Integer value) {
            addCriterion("targetType >", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("targetType >=", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeLessThan(Integer value) {
            addCriterion("targetType <", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeLessThanOrEqualTo(Integer value) {
            addCriterion("targetType <=", value, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeIn(List<Integer> values) {
            addCriterion("targetType in", values, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeNotIn(List<Integer> values) {
            addCriterion("targetType not in", values, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeBetween(Integer value1, Integer value2) {
            addCriterion("targetType between", value1, value2, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargettypeNotBetween(Integer value1, Integer value2) {
            addCriterion("targetType not between", value1, value2, "targettype");
            return (Criteria) this;
        }

        public Criteria andTargetidIsNull() {
            addCriterion("targetId is null");
            return (Criteria) this;
        }

        public Criteria andTargetidIsNotNull() {
            addCriterion("targetId is not null");
            return (Criteria) this;
        }

        public Criteria andTargetidEqualTo(String value) {
            addCriterion("targetId =", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidNotEqualTo(String value) {
            addCriterion("targetId <>", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidGreaterThan(String value) {
            addCriterion("targetId >", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidGreaterThanOrEqualTo(String value) {
            addCriterion("targetId >=", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidLessThan(String value) {
            addCriterion("targetId <", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidLessThanOrEqualTo(String value) {
            addCriterion("targetId <=", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidLike(String value) {
            addCriterion("targetId like", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidNotLike(String value) {
            addCriterion("targetId not like", value, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidIn(List<String> values) {
            addCriterion("targetId in", values, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidNotIn(List<String> values) {
            addCriterion("targetId not in", values, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidBetween(String value1, String value2) {
            addCriterion("targetId between", value1, value2, "targetid");
            return (Criteria) this;
        }

        public Criteria andTargetidNotBetween(String value1, String value2) {
            addCriterion("targetId not between", value1, value2, "targetid");
            return (Criteria) this;
        }

        public Criteria andBeforedayIsNull() {
            addCriterion("beforeDay is null");
            return (Criteria) this;
        }

        public Criteria andBeforedayIsNotNull() {
            addCriterion("beforeDay is not null");
            return (Criteria) this;
        }

        public Criteria andBeforedayEqualTo(Integer value) {
            addCriterion("beforeDay =", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayNotEqualTo(Integer value) {
            addCriterion("beforeDay <>", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayGreaterThan(Integer value) {
            addCriterion("beforeDay >", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayGreaterThanOrEqualTo(Integer value) {
            addCriterion("beforeDay >=", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayLessThan(Integer value) {
            addCriterion("beforeDay <", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayLessThanOrEqualTo(Integer value) {
            addCriterion("beforeDay <=", value, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayIn(List<Integer> values) {
            addCriterion("beforeDay in", values, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayNotIn(List<Integer> values) {
            addCriterion("beforeDay not in", values, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayBetween(Integer value1, Integer value2) {
            addCriterion("beforeDay between", value1, value2, "beforeday");
            return (Criteria) this;
        }

        public Criteria andBeforedayNotBetween(Integer value1, Integer value2) {
            addCriterion("beforeDay not between", value1, value2, "beforeday");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookIsNull() {
            addCriterion("weekendCanBook is null");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookIsNotNull() {
            addCriterion("weekendCanBook is not null");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookEqualTo(Boolean value) {
            addCriterion("weekendCanBook =", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookNotEqualTo(Boolean value) {
            addCriterion("weekendCanBook <>", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookGreaterThan(Boolean value) {
            addCriterion("weekendCanBook >", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookGreaterThanOrEqualTo(Boolean value) {
            addCriterion("weekendCanBook >=", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookLessThan(Boolean value) {
            addCriterion("weekendCanBook <", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookLessThanOrEqualTo(Boolean value) {
            addCriterion("weekendCanBook <=", value, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookIn(List<Boolean> values) {
            addCriterion("weekendCanBook in", values, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookNotIn(List<Boolean> values) {
            addCriterion("weekendCanBook not in", values, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookBetween(Boolean value1, Boolean value2) {
            addCriterion("weekendCanBook between", value1, value2, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andWeekendcanbookNotBetween(Boolean value1, Boolean value2) {
            addCriterion("weekendCanBook not between", value1, value2, "weekendcanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookIsNull() {
            addCriterion("holidayCanBook is null");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookIsNotNull() {
            addCriterion("holidayCanBook is not null");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookEqualTo(Boolean value) {
            addCriterion("holidayCanBook =", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookNotEqualTo(Boolean value) {
            addCriterion("holidayCanBook <>", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookGreaterThan(Boolean value) {
            addCriterion("holidayCanBook >", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookGreaterThanOrEqualTo(Boolean value) {
            addCriterion("holidayCanBook >=", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookLessThan(Boolean value) {
            addCriterion("holidayCanBook <", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookLessThanOrEqualTo(Boolean value) {
            addCriterion("holidayCanBook <=", value, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookIn(List<Boolean> values) {
            addCriterion("holidayCanBook in", values, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookNotIn(List<Boolean> values) {
            addCriterion("holidayCanBook not in", values, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookBetween(Boolean value1, Boolean value2) {
            addCriterion("holidayCanBook between", value1, value2, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andHolidaycanbookNotBetween(Boolean value1, Boolean value2) {
            addCriterion("holidayCanBook not between", value1, value2, "holidaycanbook");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNull() {
            addCriterion("startTime is null");
            return (Criteria) this;
        }

        public Criteria andStarttimeIsNotNull() {
            addCriterion("startTime is not null");
            return (Criteria) this;
        }

        public Criteria andStarttimeEqualTo(Date value) {
            addCriterion("startTime =", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotEqualTo(Date value) {
            addCriterion("startTime <>", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThan(Date value) {
            addCriterion("startTime >", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("startTime >=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThan(Date value) {
            addCriterion("startTime <", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeLessThanOrEqualTo(Date value) {
            addCriterion("startTime <=", value, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeIn(List<Date> values) {
            addCriterion("startTime in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotIn(List<Date> values) {
            addCriterion("startTime not in", values, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeBetween(Date value1, Date value2) {
            addCriterion("startTime between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andStarttimeNotBetween(Date value1, Date value2) {
            addCriterion("startTime not between", value1, value2, "starttime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNull() {
            addCriterion("endTime is null");
            return (Criteria) this;
        }

        public Criteria andEndtimeIsNotNull() {
            addCriterion("endTime is not null");
            return (Criteria) this;
        }

        public Criteria andEndtimeEqualTo(Date value) {
            addCriterion("endTime =", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotEqualTo(Date value) {
            addCriterion("endTime <>", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThan(Date value) {
            addCriterion("endTime >", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeGreaterThanOrEqualTo(Date value) {
            addCriterion("endTime >=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThan(Date value) {
            addCriterion("endTime <", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeLessThanOrEqualTo(Date value) {
            addCriterion("endTime <=", value, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeIn(List<Date> values) {
            addCriterion("endTime in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotIn(List<Date> values) {
            addCriterion("endTime not in", values, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeBetween(Date value1, Date value2) {
            addCriterion("endTime between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andEndtimeNotBetween(Date value1, Date value2) {
            addCriterion("endTime not between", value1, value2, "endtime");
            return (Criteria) this;
        }

        public Criteria andTicketnumIsNull() {
            addCriterion("ticketNum is null");
            return (Criteria) this;
        }

        public Criteria andTicketnumIsNotNull() {
            addCriterion("ticketNum is not null");
            return (Criteria) this;
        }

        public Criteria andTicketnumEqualTo(Integer value) {
            addCriterion("ticketNum =", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumNotEqualTo(Integer value) {
            addCriterion("ticketNum <>", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumGreaterThan(Integer value) {
            addCriterion("ticketNum >", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumGreaterThanOrEqualTo(Integer value) {
            addCriterion("ticketNum >=", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumLessThan(Integer value) {
            addCriterion("ticketNum <", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumLessThanOrEqualTo(Integer value) {
            addCriterion("ticketNum <=", value, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumIn(List<Integer> values) {
            addCriterion("ticketNum in", values, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumNotIn(List<Integer> values) {
            addCriterion("ticketNum not in", values, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumBetween(Integer value1, Integer value2) {
            addCriterion("ticketNum between", value1, value2, "ticketnum");
            return (Criteria) this;
        }

        public Criteria andTicketnumNotBetween(Integer value1, Integer value2) {
            addCriterion("ticketNum not between", value1, value2, "ticketnum");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}